package cn.bdqn.service.questionBank;


import cn.bdqn.dao.questionBank.SubjectTypeDao;
import cn.bdqn.pojo.questionBank.SubjectType;
import cn.bdqn.utils.Json;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("subjectTypeService")
public class SubjectTypeService {

    @Autowired
    private SubjectTypeDao subjectTypeDao;


    /**
     * 查询所有题目类型
     * @return
     */
    public Json selectAllSubjectType(){
        List<SubjectType> subjectTypeList = subjectTypeDao.selectList(null);
        if(subjectTypeList != null && subjectTypeList.size() > 0 ){
            return Json.ok(subjectTypeList);
        }
        return Json.fall("没找到题目类型");
    }
}
